package com.subaiwang.service.toolPlatform;

import com.subaiwang.dao.toolPlatform.ToolPlatformMapper;
import com.subaiwang.pojo.Pages;
import com.subaiwang.pojo.ToolPlatform;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("toolPlatformService")
public class ToolPlatformServiceImpl implements ToolPlatformService{
    @Resource
    private ToolPlatformMapper toolPlatformMapper;
    @Override
    public void getToolPlatform(String typename,String content, Pages pages) {
        List<ToolPlatform> list=toolPlatformMapper.getToolPlatform(typename,content,((pages.getPageNo()-1)*pages.getPageSize()),pages.getPageSize());
        pages.setToolPlatformList(list);
    }

    @Override
    public int ToolPlatformCount(String typename,String content) {
        return toolPlatformMapper.ToolPlatformCount(typename,content);
    }
}
